use super::db::auth;
use chrono::{NaiveDateTime, Utc};
use crate::model::db::auth::RoleType;

// local mehtod
impl auth::DUser {
    pub fn new(email: String, nickname: String, roletype:RoleType) -> Self
    {
        let now = Utc::now().naive_utc();
        Self{
            gid: None,
            mphone: None,
            email: None,
            reg_time: None,
            nick_name: None,
            roletype: None,
            last_logintime: None,
            pwd: None
        }
    }
}

//db method
impl auth::DUser {
    // pub fn save(&mut self, conn: &DbConn){
    //
    // }
}